.PHONY : all clean

CC      =gcc
CFLAGS 	=-g -Wall -Werror -fno-pie -fPIC -static -Wno-write-strings
LDFLAGS	=-g -ljson-c

all : dbcfgdemo

%.o:%.c
	$(CC) -c $(CFLAGS) $< -o $@

%.o:%.c %.h
	$(CC) -c $(CFLAGS) $< -o $@
	
dbcfgdemo:dbcfgdemo.o dbcfg.o
	$(CC) -o $@ $^ $(LDFLAGS)

clean:
	rm *.o dbcfgdemo
